﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RDPCommon
{
    public delegate void BroadCastEventHandler(string info);
    public interface IBroadCast
    {
        object[] BroadCastingInfo(object[] clientIds, string info);

        void AddEventReappear(string clientId, RDPCommon.BroadCastEventHandler re);
        void RemoveEventReappear(string clientId, RDPCommon.BroadCastEventHandler re);
    }

    public delegate void FaxEventHandler(string fax);
    public interface IFaxBusiness
    {
        object[] SendFax(object[] clientIds, string fax);
    }

    public delegate void UserLoginEventHandler(RDPCommon.Client.ClinetInfo clientInfo);
    public delegate void UserLogoutEventHandler(RDPCommon.Client.ClinetInfo clientInfo);
    public delegate void LoginNotifyEventHandler(RDPCommon.Client.ClinetInfo clientInfo);
    public delegate void LogoutNotifyEventHandler(RDPCommon.Client.ClinetInfo clientInfo);
    public delegate void OnlienTestEventHandler(RDPCommon.Client.ClinetInfo clientInfo);
    public interface IUserLogin
    {
        object[] Login(RDPCommon.Client.ClinetInfo clientInfo);
        object[] Logout(RDPCommon.Client.ClinetInfo clientInfo);
        object[] OnLineTest(RDPCommon.Client.ClinetInfo clientInfo);
        object[] LoginNotify(RDPCommon.Client.ClinetInfo clientInfo);//当有用户登入,通知所有客户端
        object[] LogoutNotify(RDPCommon.Client.ClinetInfo clientInfo);//当有用户注销,通知所有客户端

        void AddEventReappear(string clientId, RDPCommon.OnlienTestEventHandler re);
        void RemoveEventReappear(string clientId, RDPCommon.OnlienTestEventHandler re);

        void AddLoginNotifyEvent(string clientId, RDPCommon.LoginNotifyEventHandler re);
        void RemoveLoginNotifyEvent(string clientId, RDPCommon.LoginNotifyEventHandler re);

        void AddLogoutNotifyEvent(string clientId, RDPCommon.LogoutNotifyEventHandler re);
        void RemoveLogoutNotifyEvent(string clientId, RDPCommon.LogoutNotifyEventHandler re);
    }

    public interface IRemoteCall
    {
        object[] CallRemote(object[] ocls, object[] opms);
    }
}
